package com.fast.develop.meta.dm.builder;

import com.fast.develop.meta.dm.field.FieldCatelog;
import com.fast.develop.meta.dm.value.ValueGeneration;
import com.fast.develop.meta.dm.value.ValueValidation;

import java.util.List;

/**
 * @author 莫寅
 * @createTime 2022-06-04 19:31
 * @desc：
 */
public class MetaFieldBuilder {

    private FieldCatelog type;

    private String name;
    /**表字段**/
    private String columnName;

    private String comment;

    //默认值
    private ValueGeneration valueGenerationStrategy;

    //检验
    private List<ValueValidation> valueValidations;

    /**长度**/
    private Integer length = 0;
    /**小数位数**/
    private Integer decimalLength = 0;
    /**是否必输**/
    private Boolean required;
    /**是否主键**/
    private Boolean primaryKey;
    /**是否唯一**/
    private Boolean unique;

    /**是否可导入导出**/
    private Boolean canExcel = true;

    /**接口是否可见, 模板 apiHide **/
    private Boolean apiHide = false;


    public FieldCatelog getType() {
        return type;
    }

    public void setType(FieldCatelog type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getColumnName() {
        return columnName;
    }

    public void setColumnName(String columnName) {
        this.columnName = columnName;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public ValueGeneration getValueGenerationStrategy() {
        return valueGenerationStrategy;
    }

    public void setValueGenerationStrategy(ValueGeneration valueGenerationStrategy) {
        this.valueGenerationStrategy = valueGenerationStrategy;
    }

    public List<ValueValidation> getValueValidations() {
        return valueValidations;
    }

    public void setValueValidations(List<ValueValidation> valueValidations) {
        this.valueValidations = valueValidations;
    }

    public Integer getLength() {
        return length;
    }

    public void setLength(Integer length) {
        this.length = length;
    }

    public Integer getDecimalLength() {
        return decimalLength;
    }

    public void setDecimalLength(Integer decimalLength) {
        this.decimalLength = decimalLength;
    }

    public Boolean getRequired() {
        return required;
    }

    public void setRequired(Boolean required) {
        this.required = required;
    }

    public Boolean getPrimaryKey() {
        return primaryKey;
    }

    public void setPrimaryKey(Boolean primaryKey) {
        this.primaryKey = primaryKey;
    }

    public Boolean getCanExcel() {
        return canExcel;
    }

    public void setCanExcel(Boolean canExcel) {
        this.canExcel = canExcel;
    }

    public Boolean getApiHide() {
        return apiHide;
    }

    public void setApiHide(Boolean apiHide) {
        this.apiHide = apiHide;
    }

    public Boolean getUnique() {
        return unique;
    }

    public void setUnique(Boolean unique) {
        this.unique = unique;
    }
}
